package edu.ustb.service;

import java.util.List;

import edu.ustb.domain.Brand;
import edu.ustb.mapper.BrandMapper;
import edu.ustb.utils.MybatisUtil;

public class BrandServiceImpl implements BrandService {

	@Override
	public List<Brand> findAll() {
		BrandMapper mapper = MybatisUtil.getMapper(BrandMapper.class);
		List<Brand> list = mapper.findAll();
		MybatisUtil.close();
		return list;
	}

	@Override
	public Brand findBrandById(int brandId) {
		BrandMapper mapper = MybatisUtil.getMapper(BrandMapper.class);
		Brand brand = mapper.findBrandById(String.valueOf(brandId));
		MybatisUtil.close();
		return brand;
	}

}
